// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 设备实时数据 GET /api/deviceLive/${param0} */
export async function getDeviceLive(
  params: {
    // path
    /** 设备id */
    id: string;
  },
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.DeviceLiveItme>(`/api/deviceLive/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 设备实时数据EChartsOption GET /api/deviceLive/${param0}/option */
export async function getEChartsOption(
  params: {
    // path
    /** 设备id */
    id: string;
  },
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<{ axisData: string[]; series: Record<string, any>[] }>(
    `/api/deviceLive/${param0}/option`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** 设备实时数据详情页 GET /api/device/${param0} */
export async function getMonitoringDevicInfo(
  params: {
    // path
    /** 设备id */
    id: string;
  },
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request(`/api/device/monitoring/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}


/** 设备实时数据详情页 电流历史曲线 GET /api/device/${param0} */
export async function getMonitoringPhase(
  params: {
   
    type?: number;
  },
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request(`/api/device/monitoring/${param0}/phase`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 设备实时数据详情页 电流历史曲线 GET /api/device/${param0} */
export async function getDesignMonitoringPhase(
  params: {
   
    type?: number;
  },
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request(`/api/device/monitoring/design/${param0}/phase`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}


